package com.ctsi.uaa.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserType {
    MOBILE("mobile", 3),
    SYSTEM("system", 1),

    /**
     * 手机号码
     */
    TELECOM("telecom", 2);

    /**
     * 名称
     */
    final String name;
    /**
     * 类型
     */
    final Integer type;

    public static UserType valueOf(Integer value) {
        switch (value) {
            case 1:
                return SYSTEM;
            case 2:
                return TELECOM;
            case 3:
                return MOBILE;
            default:
                return null;
        }
    }

}
